package org.zlb.manager.entity;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Objects;

/**
 * TODO
 *
 * @author zhoulingbo
 * @date 2021/8/10 12:28
 */
@Entity
@javax.persistence.Table(name = "fun_param", schema = "admin", catalog = "")
@javax.persistence.IdClass(org.zlb.manager.entity.FunParamPK.class)
public class FunParam {
    private String paramGroup;

    @Id
    @javax.persistence.Column(name = "PARAM_GROUP")
    public String getParamGroup() {
        return paramGroup;
    }

    public void setParamGroup(String paramGroup) {
        this.paramGroup = paramGroup;
    }

    private String paramKey;

    @Id
    @javax.persistence.Column(name = "PARAM_KEY")
    public String getParamKey() {
        return paramKey;
    }

    public void setParamKey(String paramKey) {
        this.paramKey = paramKey;
    }

    private int paramSeq;

    @Basic
    @javax.persistence.Column(name = "PARAM_SEQ")
    public int getParamSeq() {
        return paramSeq;
    }

    public void setParamSeq(int paramSeq) {
        this.paramSeq = paramSeq;
    }

    private String paramValue;

    @Basic
    @javax.persistence.Column(name = "PARAM_VALUE")
    public String getParamValue() {
        return paramValue;
    }

    public void setParamValue(String paramValue) {
        this.paramValue = paramValue;
    }

    private byte paramType;

    @Basic
    @javax.persistence.Column(name = "PARAM_TYPE")
    public byte getParamType() {
        return paramType;
    }

    public void setParamType(byte paramType) {
        this.paramType = paramType;
    }

    private String paramValidate;

    @Basic
    @javax.persistence.Column(name = "PARAM_VALIDATE")
    public String getParamValidate() {
        return paramValidate;
    }

    public void setParamValidate(String paramValidate) {
        this.paramValidate = paramValidate;
    }

    private String paramDesc;

    @Basic
    @javax.persistence.Column(name = "PARAM_DESC")
    public String getParamDesc() {
        return paramDesc;
    }

    public void setParamDesc(String paramDesc) {
        this.paramDesc = paramDesc;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        FunParam funParam = (FunParam) o;
        return paramSeq == funParam.paramSeq &&
                paramType == funParam.paramType &&
                Objects.equals(paramGroup, funParam.paramGroup) &&
                Objects.equals(paramKey, funParam.paramKey) &&
                Objects.equals(paramValue, funParam.paramValue) &&
                Objects.equals(paramValidate, funParam.paramValidate) &&
                Objects.equals(paramDesc, funParam.paramDesc);
    }

    @Override
    public int hashCode() {
        return Objects.hash(paramGroup, paramKey, paramSeq, paramValue, paramType, paramValidate, paramDesc);
    }
}
